@echo off
SET KFROG_MAIN=%FROGGY_ROOT%\bin
SET ANTLR_PATH=%FROGGY_ROOT%\lib\antlr.jar

if exist "%TEST_OUTPUT%\%~n1\*" goto execution
mkdir %TEST_OUTPUT%\%~n1 

:execution
java -classpath %KFROG_MAIN%;%ANTLR_PATH% kfrog.KFrogMain --test-syntax %2 > %TEST_OUTPUT%\%~n1\%~n2.tree 2>&1

@echo *** Test result of %~n2.kfrog *** >> %TEST_OUTPUT%\%~n1_test.txt
@echo off
diff %TEST_STANDARD%\%1 %TEST_OUTPUT%\%~n1\%~n2.tree >> %TEST_OUTPUT%\%~n1_test.txt
@echo *** >> %TEST_OUTPUT%\%~n1_test.txt
@echo *** >> %TEST_OUTPUT%\%~n1_test.txt